
	//全屏轮播
	var lunbo=document.getElementsByClassName('lunbo')[0],
		imgs=lunbo.children[0],
		img=imgs.children,
		next=document.getElementsByClassName('next')[0],
		prev=document.getElementsByClassName('prev')[0],
		circle=document.getElementById("nums").children,
		timer1,
		WIDTH=getClient().width
		
		imgs.style.width=WIDTH*7+'px'
		
		for (var i=0;i<img.length;i++) {
			img[i].style.width=WIDTH+'px'
		}
	console.log(next)
	console.log(WIDTH)
	lunbo.onmouseover=function(){
      	  prev.style.display="block"
      	  next.style.display="block"
      	  clearInterval(timer1);
      	  
      }
      lunbo.onmouseout=function(){
      	  prev.style.display="none"
      	  next.style.display="none"
      	  auto()
      }
	
	var index=0
		next.onclick=function right(){
			if(index>=5){
			index=-1
			imgs.style.left="0"
		}
		
		index++
			show()
			animate(imgs,{left:-WIDTH*index})
			
			console.log(index)
		}
		
		
		prev.onclick=function(){
			
			if(index<1){
			imgs.style.left=-5*WIDTH+"px"
			index=6
		}
		
		index--
			show()
			animate(imgs,{left:-WIDTH*index})
			
			console.log(index)
		}
		
function auto(){
	timer1=setInterval(function(){
			
			if(index>=5){
			index=-1
			imgs.style.left="0"
		}
		index++
			show()
			animate(imgs,{left:-WIDTH*index})
			
			/*console.log(index)*/
		},3000)
	}
auto()
/*console.log(index)*/
//圆点封装
function show(){
	for (var i=0;i<circle.length;i++) {
		if(circle[i].className=="on"){
			circle[i].className=""
		}
	}
	circle[index].className="on"
}

//点击圆点切换图片
for (var k=0;k<circle.length;k++) {
	circle[k].n=k
	circle[k].onclick=function(){
	for(var j=0;j<circle.length;j++){
	
		circle[j].className=""
	}
	this.className="on"
	animate(imgs,{left:-WIDTH*this.n})
	index=this.n
	console.log(this.n)
}
}
/*爱尚首页*/

		$('.head_list .aj').mouseenter(function(){
			$('.home').eq($(this).index()).stop().animate({top:'-30px'});
			/*$('.ai').animate({top:'30px'})*/
			$('.ai').eq($(this).index()).stop().animate({top:'30px'});
		})
		$('.head_list .aj').mouseleave(function(){
			$('.home').eq($(this).index()).stop().animate({top:"0px"});
			$('.ai').eq($(this).index()).stop().animate({top:'0px'});
		})

		$('.aj').mouseenter(function(){
			$(this).children('.company').stop().slideDown('slow')
		})
		$('.company li').mouseenter(function(){
			$(this).css('background','deepskyblue')
			$(this).css('color','white')
			/*$(this).css('background','rgba(0,0,0,0.2)')*/
		})
		$('.company li').mouseleave(function(){
			$(this).css('background','rgba(255,255,255,0.5)')
			$(this).css('color','black')
			/*$(this).css('background','rgba(255,255,255,0.5)')*/
		})
		$('.aj').mouseleave(function(){
			$(this).children('.company').stop().slideUp('slow')
		})
		$('.logo').click(function(){
			window.location.href='index.html'
		})
		$('.aj').eq(0).click(function(){
			window.location.href='index.html'
		})
		$('.aj').eq(2).click(function(){
			window.location.href='program.html'
		})
		$('.aj').eq(3).click(function(){
			window.location.href='knowledge.html'
		})
		$('.about_1').click(function(){
			window.location.href='about.html'
		})
		
		$('.contact_1').click(function(){
			window.location.href='contact.html'
		})
		$('.contact_2').click(function(){
			window.location.href='online.html'
		})
$('.qq').mouseenter(function(){
	$('.qq div').show()
})
$('.wei').mouseenter(function(){
	$('.wei div').show()
})
$('.qq').mouseleave(function(){
	$('.qq div').hide()
})
$('.wei').mouseleave(function(){
	$('.wei div').hide()
})

